<template>  
  <div>  
    <h1>{{ greeting.message }}</h1>  
  </div>  
</template>  
  
<script>  
import axios from 'axios';  
  
export default {  
  data() {  
    return {  
      greeting: {}  
    };  
  },  
  mounted() {  
    axios.get('/api/v1/greeting')  
      .then(response => {  
        this.greeting = response.data;  
      })  
      .catch(error => {  
        console.error(error);  
      });  
  }  
};  
</script>